const videoList = [
    {
        name: "❤ 凤仙花的一生 ❤",
        link: "https://player.bilibili.com/player.html?aid=722380275&bvid=BV1eS4y1Q7Wh&cid=463472338&page=1",
    },
    {
        name: "😀【凤仙花】从种子到大苗现蕾...",
        link: "https://player.bilibili.com/player.html?aid=583189080&bvid=BV1Pz4y1d7T2&cid=190171070&page=1",
    },
    {
        name: "💅沾染夕阳的指尖！...",
        link: "https://player.bilibili.com/player.html?aid=14642193&bvid=BV1Vx411x7Bb&cid=23871504&page=1",
    },
    {
        name: "💣会弹射的凤仙花种子",
        link: "https://player.bilibili.com/player.html?aid=839027032&bvid=BV1S54y1S7fx&cid=220414595&page=1",
    },
];
var mask = mui.createMask(closeVideo);
const video = document.getElementById("video");
function closeVideo() {
    video.style.display = "none";
    video.src = "";
    window.Howler.volume(volume);
}
let volume = window.Howler._volume;
function showVideo(link) {
    volume = window.Howler._volume;
    window.Howler.volume(0);

    video.style.display = "block";
    video.src = link;
    mask.show(); //显示遮罩
    console.log(link);
}
export default function render() {
    video.style.display = "none";
    const ul = document.querySelector(".ActionList");
    videoList.forEach(({ name, link }) => {
        const li = document.createElement("li");
        li.classList.add("mui-table-view-cell");
        li.innerText = name;
        li.onclick = () => {
            showVideo(link);
            mui("#sheet1").popover("toggle");
        };
        ul.appendChild(li);
    });
}
